package wzc.design_pattern.creation.factory.simple_factory;

/**
 * @Author 王振川
 * @Date 2025/7/19
 */

public class SimpleFactory {
    public static Product createProduct(String type) {
        if ("A".equals(type)) {
            return new ProductA();
        } else if ("B".equals(type)) {
            return new ProductB();
        }
        return null;
    }
}
